Page({
  data: {
    list: ["北京", "上海", "广州", "深圳"],
    username: "张三",
    num: 0,
    address:""
  },
  //绑定事件
  myClick() {
    console.log(this.data.username)

    // this.data.username = "李四";
    // console.log(this.data.username)

    //改变页面的data，用this.setData方法
    this.setData({
      username: "李四"
    })

  },
  //接受参数
  handleClick(event) {
    // console.log(eweixivent)

    let {
      address,
      num
    } = event.target.dataset;
    // let num = event.target.dataset.num;
    this.setData({
      num,
      address
    })


  }
})